function randomNum(minNum, maxNum) {
    switch (arguments.length) {
        case 1:
            return parseInt((Math.random() * minNum + 1) + '', 10);
        case 2:
            return parseInt((Math.random() * (maxNum - minNum + 1) + minNum) + '', 10);
        default:
            return 0;
    }
}

class Colors {
    static White = '#ffffff';
    static Black = '#000000';

    static Red='#f00';
    static Danger = Colors.Red;


    /**
     * 分隔线
     * @type {string}
     */
    static Separate ='#E0E0E0';
    /**
     * 二级子标题颜色
     * @type {string}
     */
    static SubTitle = '#999999';

    /**
     * 子标题颜色
     * @type {string}
     */
    static Brief = '#666666';
    /**
     * 标题颜色
     * @type {string}
     */
    static Title = '#333333';

    /**
     * 活动颜色
     * @type {string}
     */
    static Active = '#DAC228';

    /**
     * 不可用
     * @type {string}
     */
    static UnAvailable = '#ededed';

    /**
     * 禁止使用
     * @type {string}
     */
    static Disabled = '#999';

    /**
     * 无法选择
     * @type {string}
     */
    static CanNotPick='#FF83FA';

    /**
     * 主题颜色
     * @type {string}
     */
    static Primary = '#232728';

    /**
     * 背景图片
     * @type {string}
     */
    static Background = '#f5f4f4';

    /**
     * 透明色
     * @type {string}
     */
    static Clear = 'transparent';



    static Border = '#AEADAD';


    static DarkGray='#454545';

    /**
     * 随机颜色
     * @param {boolean} alpha 是否有透明度
     * @return {string}
     * @constructor
     */
    static RandomColor = (alpha = false) => {
        if (alpha) {
            return `rgba(${randomNum(0, 255)},${randomNum(0, 255)},${randomNum(0, 255)},${Math.random()})`;
        }
        return `rgb(${randomNum(0, 255)},${randomNum(0, 255)},${randomNum(0, 255)})`;
    }
}

export default Colors;